home *** CD-ROM | disk | FTP | other *** search
/ POINT Software Programming / PPROG1.ISO / pascal / swag / keyboard.swg / 0081_Set Typo rate and Delay.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1994-08-24  |  1.3 KB  |  60 lines

  1. {
  2.  IL> INT 16 - KEYBOARD - SET TYPEMATIC RATE AND DELAY
  3.  
  4. I wrote a little utility a long time ago, that you might find a bit handy...
  5. I'm sure I have the code around here somewhere (rummage..)  Ah here :
  6.  
  7. for the typematic, delay is in increments of 250, and rate is in decrements
  8. of one...
  9. Sean Graham.....
  10. }
  11.  
  12. procedure cursor(t, b: byte); assembler; { Set cursor attribs }
  13. asm
  14.    mov ax, $0100
  15.    mov ch, t
  16.    mov cl, b
  17.    int $10
  18. end;
  19.  
  20. procedure v50; assembler;                { Go to 50 line mode }
  21. asm
  22.    mov ax,1202h
  23.    mov bl,30h
  24.    int 10h
  25.    mov ax,3
  26.    int 10h
  27.    mov ax,1112h
  28.    xor bl, bl
  29.    int 10h
  30. end;
  31.  
  32. procedure v25; assembler;                { Go to 25 line mode }
  33. asm
  34.    mov ax,$0003
  35.    int $10
  36. end;
  37.  
  38. procedure typematic(rate, delay: byte); assembler;
  39. asm
  40.    mov ah, 3
  41.    mov al, 5             {Set Typematic Rate And Delay        }
  42.    mov bh, rate          {00h = 30/sec to 1fh = 2/sec         }
  43.    mov bl, delay         {00h = 250ms to 03h = 1000ms         }
  44.    int $16
  45. end;
  46.  
  47.  
  48.  {Int $16 Function $03; { Set type matic Rate }
  49.  {MAYNARD PHILBROOK,Re  Keyboard Speed Adjust}
  50.  
  51.  Procedure SetTypeRate(Kdelay, Krate:Byte);
  52.   Begin
  53.    asm
  54.     Mov AX,$0305; { on a PC jr, AL reg has extra Functions }
  55.     Mov BH, Kdelay;
  56.     Mov BL, Krate;
  57.     Int $16;
  58.    End;
  59.   End;
  60.